$sidebarWidth: 260;
$darkBlue: #16576B;
$liteBlue: #00A6FA;

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    padding: 0;
    margin: 0;
}

#bgCanvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
}

/*定义滚动条高宽及背景
 高宽分别对应横竖滚动条的尺寸*/
::-webkit-scrollbar
{
    width: 4px;
    height: 6px;
    background-color: #F5F5F5;
}
/*定义滚动条轨道
 内阴影+圆角*/
::-webkit-scrollbar-track
{
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.1);
    border-radius: 10px;
    background-color: #F5F5F5;
}
/*定义滑块
 内阴影+圆角*/
::-webkit-scrollbar-thumb
{
    border-radius: 10px;
    -webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.1);
    background-color: #555;
}

header {
    display: block;
    width: 100%;
    height: 36px;
    padding: 10px 24px;
    font-size: 18px;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
    color: #003379;
    background: url();

    & > .title {
        font-family: 'Roboto Condensed', sans-serif;
        font-size: 25px;
        color: #FFF;
        text-shadow: -1px -1px 0px #2C7485;
    }

    & > .decription {
        letter-spacing: -1px;
        text-align: center;
        text-shadow: -1px -1px 0px #388ACA;
        font-size: 12px;
        color: #A5D0F2;
        padding-left: 20px;
    }
}

div.sidebar {
    position: fixed;
    width: $sidebarWidth + px;
    overflow-y: scroll;
    top: 56px;
    bottom: 0;
    padding: 0;
    border-right: 1px solid #eee;

    &::after {
        content: '';
        position: absolute;
        z-index: 2;
        left: 0;
        width: $sidebarWidth + px;
        /*border-bottom: 1px solid #8ac6ef;*/
        box-shadow: 0px 0px 2px 1px #8ac7ef;
    }
}

.github {
    position: absolute;
    left: 620px;
    top: 13px;
}

/*div.demos {
    position: fixed;
    left: 220px;
    top: 0;
    height: 56px;
}*/

/*ul {
    padding: 5px;
    margin: 5px;
}

li {
    list-style: none;
}*/

/*li.sidebar-folder {
    font-size: 16px;
    color: $liteBlue;
    padding: 10px 0 5px;
    cursor: default;
}
li.sidebar-title {
    font-size: 14px;
    color: $liteBlue;
    padding: 5px 0 5px 10px;
    cursor: pointer;
    background: white;
    transition: all 1.2s;

    & > .sidebar-text {
        &:hover {
            border-bottom: 1px solid $darkBlue;
        }
    }
}
li.sidebar-active {
    color: $darkBlue;
    background: linear-gradient(90deg, #fff, #479ce0);
}
*/

div.content {
    position: fixed;
    top: 56px;
    left: $sidebarWidth + 20 + px;
    right: 0;
    overflow-y: auto;
    bottom: 0;
    padding: 0 30px;
    font-size: 14px;
    line-height: 22.4px;
    color: #445566;

    & > .content-inner {
        padding-bottom: 100px;
    }
}

div.demo {
    position: fixed;
    z-index: 10;
    left: 0;
    top: 58px;
    right: 0;
    bottom: 0;
    background: white;
    padding: 16px;
    display: flex;

    & > .demo-close {
        position: absolute;
        cursor: pointer;
        top: 16px;
        right: 14px;
        width: 55px;
        height: 20px;
        background: #000;
        color: #fefefe;
        transition: all .1s;
        line-height: 20px;
        text-align: center;
        font-weight: bold;
        user-select: none;
        box-shadow: #525252 -1px 1px 5px;

        &:hover {
            box-shadow: #525252 -1px 1px 3px;
        }
        &:active {
            box-shadow: #525252 -1px 1px 7px;
        }
    }

    & > .demo-code {
        display: inline-block;
        position: relative;
        min-width: 300px;
        flex: 2;
        height: 100%;
        box-shadow: #a9a9a9 1px 1px 5px 1px;

        & > .ace {
            width: 100%;
            height: 100%;
        }

        & > .demo-update {
            position: absolute;
            cursor: pointer;
            z-index: 2;
            right: 0;
            top: 0;
            width: 40px;
            height: 20px;
            background: #000;
            color: #fefefe;
            line-height: 20px;
            text-align: center;
            font-weight: bold;
            user-select: none;
            box-shadow: #525252 -1px 1px 5px;

            &:hover {
                box-shadow: #525252 -1px 1px 11px;
            }
            &:active {
                box-shadow: #525252 -1px 1px 17px;
            }
        }
    }


    & > .demo-frame {
        display: inline-block;
        margin-left: 10px;
        min-width: 402px;
        flex: 1;
        height: 100%;
        box-shadow: #a9a9a9 1px 1px 5px 1px;

        & > iframe {
            width: 100%;
            height: 100%;
            border: 0;
        }
    }
}

div.demo-transition {
    &-small {
        position: fixed;
        z-index: 9;
        box-shadow: -1px -1px 1px 0 #388ACA;
        width: 20px;
        height: 20px;
        right: 20px;
        top: 16px;
        transition: right .2s;
        cursor: pointer;

        &:hover {
            box-shadow: -2px -2px 0px 0px #388ACA;
        }
    }
    &-big {
        left: 13px;
        top: 58px;
        right: 13px;
        bottom: 13px;
        width: 99%;
        height: 99%;
    }
}

h1 {
    margin: 30px 0 5px;
    padding-bottom: 10px;
    width: 100%;
    font-size: 1.6em;
}
h2 {
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
    margin: 30px 0 0;
    font-size: 1.4em;
    font-weight: 500;
}
h3 {
    font-size: 1.3em;
    font-weight: 500;
}
h4 {
    font-size: 1.2em;
    font-weight: 500;
}
h5 {
    font-size: 1em;
    font-weight: 500;
}
strong {
    font-weight: 500;
    color: #f13a00;
    background: #f5f5f5;
    padding: 0 4px;
}
a {
    font-weight: 500;
    color: #009245;
    text-decoration: none;
}
img.article-img {
    margin: 10px 0 10px 1%;
    max-width: 600px;
    box-shadow: #e2e2e2 0px 0px 20px 4px;
}
p.tip {
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px solid #a5a5a5;
    color: #a1abb3;
}
section.demo-box {
    display: block;
    height: 32px;

    & > code {
        // 不知道为什么，新版本chrome，display为none的话，节点innerText的换行符没了
        // display: none;
        width: 0;
        height: 0;
        overflow: hidden;
        display: block;
        opacity: 0;
    }

    & > .code-2-demo {
        /* demos中的运行按钮的宽度是固定的 */
        line-height: 20px;
        width: auto !important;
        padding-left: 25px;
    }
}
code {
    display: inline-block;
    margin: 5px 20px;
    padding: 16px;
    overflow: auto;
    line-height: 1.45;
    background-color: #f6f8fa;
    border-radius: 3px;
    font-size: 13px;
}
div.code-2-demo {
    position: static;
    position: sticky;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    cursor: pointer;

    &:hover {
        opacity: 0.8;
    }

    & + code {
        margin-top: -20px;
    }
}

.bg-demo {
    background: url();
    background-size: 20px 20px;
    background-repeat: no-repeat;
}

table {
    display: table;
    border-collapse: collapse;
    margin: 20px 0 40px;
    width: 0;
    border-spacing: 2px;
    border-color: grey;
    font-size: 13px;
    line-height: 20px;

    & > thead {
        display: table-header-group;
        vertical-align: middle;
        border-color: inherit;
        border-collapse: collapse;
    }

    & > thead > tr, & > tbody > tr {
        border-bottom: 1px solid #ccc;

        & > td, th {
            padding: 7px 10px;
            text-align: left;
            vertical-align: top;
            min-width: 200px;
        }
    }
}

